﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="TaskNotification.ascx.cs" Inherits="SimplePMT.Control.TaskNotification" %>
&nbsp;<br>
<table width="100%" cellpadding=3 style="font-family: Tahoma;font-size: 13px;">
        <tr>
            <td style="white-space:nowrap;color:#ffffff" bgcolor="#869AAE"><%= taskLocation %> : <b><%= taskTitle %></b></td>
        </tr>
        <tr>
            <td style="border:1px solid #6893cf;" bgcolor="#ffffff" valign=top>
                <div id="TaskView">
                <table width="100%" align=center style="font-family: Tahoma;font-size: 12px;">
                    <tr>
                        <td align=right><b>Title:</b></td>
                        <td><%= task.Title %></td>
                    </tr>
                    <tr>
                        <td align=right valign=top><b>Description:</b></td>
                        <td><%= Common.ConvertToHTML(task.Description) %></td>
                    </tr>
                    <tr>
                        <td align=right><b>Task Type:</b></td>
                        <td><%= FormElement.Select(150, "TaskTypeID", taskTypeId, taskTypeOptions, "", false) %>&nbsp;&nbsp;&nbsp;<b>Priority:</b>&nbsp;<%= FormElement.Select(150, "PriorityID", taskPriorityId, taskPriorityOptions, "", false) %></td>
                    </tr>
                    <tr>
                        <td align=right><b>Created By:</b></td>
                        <td><%= createdBy %> (on <%= createDate %>)</td>
                    </tr>
                    <tr>
                        <td align=right><b>Assigned To:</b></td>
                        <td><%= FormElement.Select(150, "AssignedMemberID", task.AssignedMemberID, memberOptions, "", false) %><% if (task.AssignedMemberID > 0) { %> (on <%= assignDate %>)<% } %></td>
                    </tr>
                    <tr>
                        <td align=right><b>Est.&nbsp;Hours:</b></td>
                        <td><%= FormElement.TextBox(2, "HoursEstimated", task.HoursEstimated.ToString(), "", (task.ID == 0)) %>&nbsp;&nbsp;
                        <% if (task.ID > 0) { %><b>Actual&nbsp;Hours:</b>&nbsp;<%= taskHours.ToString() %><% } %>
                        </td>
                    </tr>
                    <tr>
                        <td align=right><b>Est.&nbsp;Complexity:</b></td>
                        <td valign=top><table cellspacing=0 border=0 cellpadding=0 style="font-family: Tahoma;font-size: 12px;"><tr><td><%= FormElement.Select(150, "ComplexityEstimatedID", task.ComplexityEstimatedID, complexityOptions, "", false)%></td><% if (task.ID > 0) { %><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<b>Actual&nbsp;Complexity:</b></td><td>&nbsp;<%= FormElement.Select(150, "ComplexityActualID", task.ComplexityActualID, complexityOptions, "", false) %><% } %></td></tr></table></td>
                    </tr>
                    <tr>
                        <td align=right><b>Due Date:</b></td>
                        <% string dueDate = "";
                            if(task.DueDate.HasValue) {
                                dueDate = task.DueDate.Value.ToShortDateString();
                            } %>
                        <td><%= dueDate %></td>
                    </tr>
                    <tr>
                        <td colspan=2 height=2></td>
                    </tr>
                    <tr>
                        <td align=right><% if (task.ID > 0) { %><b>Complete:</b><% } %></td>
                        <td style="white-space:nowrap;"><% if (task.ID > 0) { %><%= FormElement.CheckBox("IsComplete", taskComplete, "Yes (" + task.ClosedDateTime + ")|No", " OnClick=\"noteComplete(this);\"", false, !task.ClosedDateTime.ToShortDateString().Equals("1/1/1900"))%><% } %></td>
                    </tr>
                    
                </table>
                </div>
            </td>
        </tr>
        <% if (task.ID > 0) { %>
        <tr>
            <td width="90%" height=3></td>
        </tr>
        <tr>
            <td width="90%" style="white-space:nowrap;color:#ffffff" bgcolor="#869AAE"><b>Task Notes</b></td>
        </tr>
        <tr>
            <td style="border:1px solid #6893cf;" valign=top id="noteList">
                <table width=100% style="font-family: Tahoma;font-size: 12px;">
                <%= taskNotes %>
                </table>
            </td>
        </tr>
        <% } %>   
    </table>
    